home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 026a / dbtcn125.zip / DBTCNVT.DOC next >
Text File  |  1990-12-06  |  10KB  |  301 lines

  1.  
  2.  
  3.                            DBTCNVT DOC - December 1990
  4.  
  5.  
  6.  
  7.         DBTCNVT
  8.         Erik A McBeth
  9.              
  10.                                      INTRODUCTION
  11.              
  12.              
  13.              DBTCoNVerT is designed to help in the shrinking and
  14.         optimization of memo fields in both dBASE III, III+ and IV. 
  15.         DBTCNVT can also convert memo files from dBASE IV format to dBASE
  16.         III and back again.  Because it works on live data you should
  17.         always MAKE A BACKUP OF YOUR DATA before you begin.  Neither 
  18.         Ashton-Tate nor its author assumes ANY responsibility for damages
  19.         incurred as a result of using DBTCNVT.  
  20.              DBTCNVT has various options which allow the user to change
  21.         the blocksize of dBASE IV memos.  A block is the smallest unit
  22.         that dBASE uses when storing memo data.  If you generally only
  23.         input 248 characters per memo then you are wasting at least 256
  24.         characters per memo since the default block size is 512 bytes
  25.         (the missing 8 bytes is binary data).  With DBTCNVT you can set
  26.         the blocksize to virtually anything (in the particular case you
  27.         might choose 256) in order to optimize the size of the file and
  28.         the speed at which dBASE processes the memo data.
  29.              DBTCNVT will also allow you to "pack" the memo file and
  30.         remove any de-allocated blocks.  Running DBTCNVT without any
  31.         options will tell you how much wasted space you have in the memo
  32.         file.  Decreasing wasted blocks should increase speed and free up
  33.         disk space.   
  34.              DBTCNVT assumes that everything is fine with the memo file
  35.         and will abort if problems are found, leaving you in limbo.  To
  36.         insure against this you should do ONE of the following:
  37.              
  38.              1) Run a memo checker like DBTCHECK to correct any errors
  39.              2) Run DBTCNVT without options and see if errors found
  40.              3) Run DBTCNVT with an output destination specified
  41.  
  42.         The best recommendation would be #1 since its checking
  43.         capabilities surpass DBTCNVT.
  44.              
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.                                   DBTCNVT INTRO
  59.  
  60.  
  61.  
  62.  
  63.                            DBTCNVT DOC - December 1990
  64.  
  65.  
  66.  
  67.                                   DBTCNVT SYNTAX
  68.  
  69.  
  70.         DBTCNVT file name  [/P /O /Bx /3 /4 /6 /I /Rx /D /Cx]
  71.         where:
  72.  
  73.         file name   = the dBASE file you want converted/packed
  74.  
  75.         /P          = Pack the memo file and remove waste space/blocks. 
  76.                                               
  77.         /O          = Give an output file name.  By default DBTCNVT
  78.                       creates a memo file called filename.DBC and at the
  79.                       end of any packing/converting it overwrites the old
  80.                       memo file with the new file.  If something should
  81.                       go wrong during the packing you may end up a DBF
  82.                       file that is out of sync with the memo file. 
  83.                       Specifying an output destination insures that the
  84.                       original data is not harmed.  PLEASE NOTE:  If the
  85.                       input file has a production MDX file DBTCNVT will
  86.                       NOT create one for the new output file. 
  87.               
  88.         /Bx         = Blocksize of the new memo file, specified in x
  89.                       number of bytes.  The smallest blocksize available
  90.                       and tested is 24 and the largest is 32767.  If not
  91.                       specified DBTCNVT will just use the current
  92.                       blocksize.
  93.  
  94.         /3          = Converts memo file to dBASE III memo format with a
  95.                       block size of 512.
  96.  
  97.         /4          = Converts memo file to dBASE IV memo format, you can
  98.                       specify block size of new file with the /B
  99.                       parameter.
  100.  
  101.         /6          = Converts memo file to dBASE IV memo format but with
  102.                       an SQL version byte, you can specify block size of
  103.                       new file with the /B parameter.
  104.  
  105.         /I          = Info on just the records which have memos.  You
  106.                       might use this info to determine the optimal block
  107.                       size for your memo file.
  108.  
  109.         /Rx         = Force the reading of the input file using a
  110.                       blocksize of x bytes.  Use this when you suspect
  111.                       that the blocksize setting for the dbt file has
  112.                       become corrupted.
  113.  
  114.  
  115.  
  116.  
  117.  
  118.                                  DBTCNVT SYNTAX
  119.  
  120.  
  121.  
  122.  
  123.                            DBTCNVT DOC - December 1990
  124.  
  125.  
  126.  
  127.         /D          = Disregard errors like lost/deleted blocks or "hex
  128.                       code" errors.  These errors would normally halt the
  129.                       program prematurely but since we can't use the data
  130.                       in the memo blocks anyway, just ignore them.  These
  131.                       and EOF char are considered .DBF file level errors.
  132.  
  133.         /Cx         = Convert to the memo data to x-case where U=UPPER
  134.                       and l=lower.  Handy when having to do searches on
  135.                       memo data. 
  136.              
  137.         all parameters besides the file name are optional and are NOT
  138.         case sensitive, DBTCNVT will NOT convert/pack a file unless you
  139.         tell it to.
  140.  
  141.                DBTCNVT tester
  142.  
  143.         we want DBTCNVT to check for errors in the dBASE data file 
  144.         TESTER.DBF and also show if the file needs packing.  DBTCNVT can
  145.         only report problems, not fix them.  If we found problems we
  146.         should get a utility like DBTCHECK to fix them.
  147.  
  148.                DBTCNVT info /P
  149.  
  150.         we want DBTCNVT to "pack" our memo file to eliminate wasted
  151.         space.
  152.  
  153.                DBTCNVT client /B128  
  154.  
  155.         we want DBTCNVT to convert and change our block size to 128
  156.         bytes.  When trying to find the optimal block size for your memo
  157.         file you want to strike a balance between the size of the blocks
  158.         and the number of blocks.  Setting the block size too small may
  159.         yield too many blocks which slows down read access to the file. 
  160.         As an example, if we have a memo which has a length of 200
  161.         characters and set the block size to 512 we are wasting 304 bytes
  162.         of space (8 bytes for header info), if we set the block size to
  163.         100 we eliminate some "dead" space but now dBASE must read 3
  164.         blocks of data in order to process that particular memo.  A
  165.         better choice would be a blocksize of 256, this would cut down on
  166.         dead space, keep the speed up, and allow for memo growth.  Of
  167.         course when deciding on the optimal size for a memo file you must
  168.         judge what the average length of ALL memos and decide from that.
  169.  
  170.         PLEASE NOTE: For speed of processing DBTCNVT will only show every
  171.         50th memo as it is analyzing and every 50th record when creating
  172.         a new file, unless of course an error occurs before then.
  173.           
  174.  
  175.  
  176.  
  177.  
  178.                                  DBTCNVT SYNTAX
  179.  
  180.  
  181.  
  182.  
  183.                            DBTCNVT DOC - December 1990
  184.  
  185.  
  186.  
  187.                              DBTCNVT ERROR MESSAGES
  188.  
  189.                     Explanation of errors which occur with memos.
  190.  
  191.         Deleted   - Memo block deleted, DBF marker points to a memo
  192.                     which has been deleted or has a length of zero.  
  193.  
  194.         Lost      - Memo block doesn't exist, DBF marker points beyond
  195.                     the end of the file.  
  196.  
  197.         Too big   - Memo is too big, the memo either has a length
  198.                     greater than the size of the file or the end of file
  199.                     marker was never found in this memo.  
  200.  
  201.         Hex code  - The memo marker is in hex code format as opposed to
  202.                     the traditional ASCII.  Hex codes in the dbf data
  203.                     may impede dBASE copy operations.
  204.  
  205.         EOF char  - End-Of-File character in the .DBF file, will be
  206.                     fixed if /D parameter is specified. 
  207.               
  208.                     Any of the errors above can be fixed using DBTCHECK.
  209.  
  210.  
  211.         Error in closing file
  212.                 Had some trouble closing the file.
  213.  
  214.         Error in creating file
  215.                 Had some trouble creating a fresh file, check for files
  216.                 with the same name that may be READ-ONLY.  
  217.  
  218.         Error in deleting file
  219.                 Had some trouble deleting the file.
  220.  
  221.         Error in finding size of file
  222.                 Couldn't figure out how big a file was.
  223.  
  224.         Error in memory allocation of
  225.                 Ran out of memory to allocate memory for this object.
  226.  
  227.         Error in opening file
  228.                 Had some trouble opening the file, check for files that
  229.                 may be READ-ONLY.
  230.  
  231.         Error in parameter passed
  232.                 You specified an unknown or incorrect parameter.
  233.  
  234.         Error in reading from file
  235.  
  236.  
  237.  
  238.                              DBTCNVT ERROR MESSAGES
  239.  
  240.  
  241.  
  242.  
  243.                            DBTCNVT DOC - December 1990
  244.  
  245.  
  246.  
  247.                 Trouble reading from file, may be sign of file
  248.                 corruption.
  249.  
  250.         Error in seeking in file
  251.                 Trouble moving around in file, may be corruption or bad
  252.                 disk.
  253.  
  254.         Error in value of parameter passed
  255.                 The value passed may be too high or low.
  256.  
  257.         Error in writing to file
  258.                 Trouble writing to file, may be corruption or bad disk.
  259.  
  260.         Error file exists
  261.                 Unable to create a new file since a file already exists
  262.                 with this name.
  263.  
  264.         Error must stop
  265.                 Some fatal error occurred and the program cannot
  266.                 continue.
  267.                       
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.                              DBTCNVT ERROR MESSAGES
  299.  
  300.  
  301.